#ifndef _UART_DEBUG_H_
#define _UART_DEBUG_H_

typedef unsigned char uchar;
typedef unsigned int uint;
typedef unsigned long ulong;

typedef unsigned char u8;
typedef unsigned int u16;
typedef unsigned long u32;

// TEST======================
#define ENTER_CRITICAL() _emi = 0
#define EXIT_CRITICAL() _emi = 1

#define TX_SET()		_pc1=1
#define TX_CLR()		_pc1=0
#define TX_OUTPUT()	_pcc1=0;

//#define TX_SET() _pb4 = 1
//#define TX_CLR() _pb4 = 0
//#define TX_OUTPUT() _pbc4 = 0



// #define 	BAUD_RATE	327 //12MHZ 9600
// #define 	BAUD_RATE	196 //8MHZ 9600
// #define 	BAUD_RATE	93 //8MHZ 19200
// #define 	BAUD_RATE	43//41 //16MHZ 19200
#define BAUD_RATE 100//102//95 //16MHZ 38400
#define B232Delay(BAUD_RATE) GCC_DELAY(BAUD_RATE)

//#define UART_ASCII 1

void uart_put_char(unsigned char sdata);
void uart_print_uint(unsigned int value);

#endif